package com.xbongbong.pro.knowledge.base.pojo;

import com.xbongbong.paas.pojo.ButtonPojo;
import com.xbongbong.saas.domain.entity.KnowledgeTagEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;


@Getter
@Setter
@ToString
public class TagPojo {
    /**
     * id
     */
    private Long id;

    /**
     * 名称
     */
    private String name;

    /**
     * 颜色
     */
    private String color;

    /**
     * 标签类型
     */
    private Integer type;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 标签组id
     */
    private Long groupId;

    /**
     * 原标签组名称
     */
    private String groupName;

    /**
     * 操作
     */
    private List<ButtonPojo> option;

    public TagPojo() {
    }

    public TagPojo(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public TagPojo(Long id, String name, Integer type) {
        this.id = id;
        this.name = name;
        this.type = type;
    }

    public TagPojo(KnowledgeTagEntity scrmTagEntity) {
        this.id = scrmTagEntity.getId();
        this.name = scrmTagEntity.getName();
        this.color = scrmTagEntity.getColor();
        this.groupId = scrmTagEntity.getParentId();
    }
}